package com.collection;

import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;

/**
 * @Author WaveHi
 * @Date 15/8/2021 下午 6:31
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description 研究Map接口的结构
 */
public class TestMap {

    public static void main(String[] args) {

        //测试Map接口
        Map<String,Integer> m1 = null;

        //测试Map接口的实现类
        //测试HashMap类
        HashMap<String, Integer> hm1 = new HashMap<>();
        Integer age1 = hm1.put("age", 19);
        Integer age = hm1.put("age", 10);
        System.out.println(age1);
        System.out.println(age);
        hm1.put("id",1);
        System.out.println("The map hm1 is :" + hm1);
        Integer integer = hm1.get("age");

        //测试TreeMap类
        TreeMap<String, Integer> tm1 = new TreeMap<>();




    }

}
